package VN.EDU.IMIC.DEVELOPER.TRANTHITHANHNGA.EXAM01.TASK1;

public class Rhombus_Controllers implements IGeometricObject {

	private Rhombus_Entity Obj;
	
	
	
	public Rhombus_Controllers(Rhombus_Entity obj) {
		Obj = obj;
	}

	@Override
	public double getArea(Object obj) {
		Rhombus_Entity Obj = (Rhombus_Entity) obj;
		return Obj.getDiagonal1() * Obj.getDiagonal2() / 2;
	}

	@Override
	public double getPerimeter(Object obj) {
		Rhombus_Entity Obj = (Rhombus_Entity) obj;
		return Obj.getSide()*4;
	}

}
